﻿namespace Utils.JobTask
{
    class JobQueue
    {
        public object[] Args { get; }

        public long ExecuteTime { get; }
        /// <summary>
        /// 重试次数
        /// </summary>
        private int RetryCount;

        public JobQueue(object[] args, long executeTime, int retryCount)
        {
            this.Args = args;
            this.ExecuteTime = executeTime;
            this.RetryCount = retryCount;
        }

        /// <summary>
        /// 计算次数
        /// </summary>
        /// <returns></returns>
        public bool Reduce()
        {
            return --RetryCount <= 0;
        }
    }

}
